﻿using ChurchDiary.BLL;
using ChurchDiary.TableEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace FGPC.Controllers
{
    public class HomeController : Controller
    {

        //latest
        public ActionResult Index()
        {
            ViewBag.Description = "Welcome to the Full Gospel Pentecostal Churches. I am glad you have chosen to spend a few moments looking around, discovering our church family. As I describe Full Gospel Pentecostal Church to people, I use words like ‘community’ and ‘family.’";
            ViewBag.Authur = "Full Gospel Pentecostal Church";

            EntityWebsiteVisiter WebsiteVisiter = new EntityWebsiteVisiter();
            return View();
        }

        public ActionResult Banner()
        {
            return PartialView();
        }

        public JsonResult SaveSubcriber(EntitySubcriber Subcriber)
        {
            return Json(new BLL_Website().AddSubcriber(Subcriber), JsonRequestBehavior.AllowGet);
        }
    }
}

/*USE [fgpcdb]
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[CH_WebsiteVisiter](
	[VisitersId] [uniqueidentifier] NOT NULL,
	[SessionId] [nvarchar](500) NULL,
	[IpAddress] [nvarchar](100) NULL,
	[VisitedTime] [datetime] NOT NULL,
 CONSTRAINT [PK_dbo.CH_WebsiteVisiter] PRIMARY KEY CLUSTERED 
(
	[VisitersId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO


*/